# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

_pkgname=aiosqlite
pkgname=python-$_pkgname
pkgver=0.19.0
pkgrel=2
pkgdesc='asyncio bridge to the standard sqlite3 module'
arch=('any')
url='https://github.com/omnilib/aiosqlite'
license=('MIT')
depends=('python-typing_extensions' 'python-pydantic')
makedepends=('python-build' 'python-installer' 'python-flit-core')
checkdepends=('python-pytest-runner')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('4e5b9d171dd8f6b95e29fa5fd05ec4ce3ba7e95293c57fbffdd5189a03d0eba03f9b318adef1da011e22bfa4bd6b914903ea578d68eefad558533ae21b75b79a')

# TODO: package test requirements

build() {
  cd $_pkgname-$pkgver

  python -m build --wheel --no-isolation
}

#check() {
#  cd $_pkgname-$pkgver
#
#  python setup.py pytest
#}

package() {
  cd $_pkgname-$pkgver

  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
